package cn.com.sinosoft.app.freemaker;

import java.io.File;
import java.io.IOException;

import cn.com.sinosoft.app.utils.ResourceLoader;
import freemarker.template.Configuration;
/**
 * freemarker配置
 * @ClassName: FreemarkerConfiguration
 * @Description: freemarker配置
 */
public class FreemarkerConfiguration {

	private static Configuration config = null;

	static {
		config = new Configuration();
		String path = ResourceLoader.getPath("");
		System.out.println("path="+path);
		try {
			config.setDirectoryForTemplateLoading(new File(path));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	/**
	 * 获取 FreemarkerConfiguration
	 */
	public static Configuration getConfiguration() {
		return config;
	}

}